<?php

namespace app\article\controller;

use think\cache\driver\Redis;
use think\Controller;

class Jackpot extends Controller
{
    //
    public function choujiang()
    {
        $redis = new Redis();

        $redis->select(4);
        $redis->zadd('city',80,'guangzhou');
        $redis->zadd('city',75,'shanghai');
        $redis->zadd('city',70,'xianggang');
        $redis->zadd('city',65,'aomen');
        $redis->zadd('city',60,'hubei');
        $redis->zadd('city',55,'wuhan');
        $redis->zadd('city',50,'shiyan');

        return "ok";

    }

    public function kaijiang()
    {
        $redis = new Redis();
        $redis->select(4);
       // $res =  $redis->zrange('city',0,-1);
        $res =  $redis->zrangebyscore('city',1,100);

        halt($res);


    }
}
